{*<!--

+---------------------------------------------------------------------------+
| Revive Adserver                                                           |
| http://www.revive-adserver.com                                            |
|                                                                           |
| Copyright: See the COPYRIGHT.txt file.                                    |
| License: GPLv2 or later, see the LICENSE.txt file.                        |
+---------------------------------------------------------------------------+

-->*}

{if $configLocked}
    <div class='errormessage'><img class='errormessage' src='{$assetPath|escape}/images/padlock-{$image}.gif' width='16' height='16' border='0' align='absmiddle'>
        {t str=EditConfigNotPossible}
    </div>
{/if}

{include file=plugin-group-switcher.html}

{if $formError && $formError.id > 0 && $formError.message}
<div class="error-box" style="margin-bottom: 10px">
        {$formError.message|escape}
      </div>
</div>
{/if}
<div style="min-width: 750px">
    <form name="packageform" id="packageform" method="post" action="plugin-index.php" enctype="multipart/form-data">
            <div class="control-panel">
                <div class="control-set left">
    		        <span class='corner bottom-left'></span>
    		        <span class='corner bottom-right'></span>

    	            <h2>Upgrade this plugin</h2>
    	            Select file
    	            <input name="package" value="{$aPackage.name}" type="hidden">
                    <input name="token"   value="{$token}" type="hidden" />
    	            <input name="filename" tabindex="1" type="file" {if $configLocked}disabled='true'{/if}>
    	            <input value="Upgrade" name="upgrade" tabindex="1" type="submit" {if $configLocked}disabled='true'{/if}>
                </div>
                <div class="control-set left">
    		        <span class='corner bottom-left'></span>
    		        <span class='corner bottom-right'></span>

    	            <h2>Tools</h2>
    	            <input name="package" value="{$aPackage.name}" type="hidden">
    	            <input value="Diagnose" name="diagnose" tabindex="3" type="submit" {if $configLocked}disabled='true'{/if}>
    	            <input name="package" value="{$aPackage.name}" type="hidden">
    	            <input value="Export Code" name="export" tabindex="3" type="submit" {if $configLocked}disabled='true'{/if}>
    	            <input name="package" value="{$aPackage.name}" type="hidden">
    	            <input value="Backup Tables" name="backup" tabindex="3" type="submit" {if $configLocked}disabled='true'{/if}>
    	        </div>
            </div>
    </form>
</div>
{if $aWarnings}
    <div class="error-box" style="margin-bottom: 10px">
        {foreach from=$aWarnings key=idx item=warning}
            {$warning}
            <br />
        {/foreach}
    </div>
{/if}
{if $aErrors}
    <div class="error-box" style="margin-bottom: 10px">
        {foreach from=$aErrors key=idx item=error}
            {$error}
            <br />
        {/foreach}
    </div>
{/if}
{if $aMessages}
    <div class="infomessage" style="margin-bottom: 10px">
        {foreach from=$aMessages key=idx item=message}
            {$message}
            <br />
        {/foreach}
    </div>
{/if}
<div style="min-width: 750px">
    <p class="backlink"><a href="{$backURL}">&laquo; Back to plugins list</a></p>

    <div class='panel'>
        <span class='corner top-left'></span>
        <span class='corner top-right'></span>
        <span class='corner bottom-left'></span>
        <span class='corner bottom-right'></span>

        <div style="overflow: hidden;">
	        <div class="split-right">
		        <table class="detail-table">
		            <tr><th>Version</th><td>{$aPackage.version}</td><th>Author</th><td>{$aPackage.author}</td></tr>
		            <tr><th>Creation Date</th><td>{$aPackage.creationdate}</td><th>Email</th><td>{if {$aPackage.authoremail}<a href="mailto:{$aPackage.authoremail}">{/if}{$aPackage.authoremail}{if {$aPackage.authoremail}</a>{/if}</td></tr>
		            <tr><th>License</th><td>{$aPackage.license}</td><th>URL</th><td>{if {$aPackage.authorurl}<a href="{$aPackage.authorurl}">{/if}{$aPackage.authorurl}{if {$aPackage.authorurl}</a>{/if}</td></tr>
				</table>
	        </div>

	        <div class="split-left">
                <div class="item-info">
                    <p>
                        <span class="name">
                            {if $aPackage.displayname != ''}
                                {$aPackage.displayname}
                            {else}
                                {$aPackage.name}
                            {/if}
                        </span>
                    </p>
                    <p>{$aPackage.description}</p>
                </div>
            </div>

	      </div>
    </div>

    {include file=plugin-group-index-list.html aPlugins=$aPlugins hideSwitcher=true}

    <div class='panel'>
        <span class='corner top-left'></span>
        <span class='corner top-right'></span>
        <span class='corner bottom-left'></span>
        <span class='corner bottom-right'></span>

        <div style="overflow: hidden;">
           <pre class='item-info'>{$readme}</pre>
	    </div>
    </div>

</div>